package com.shgbit.tdd.fizzbuzz;

/**
 * @author liuyong
 * @date 2020/3/27 22:23
 */
public class FizzBuzz {

    public static String of(int num) {
        if (num % 3 == 0 & num % 5 == 0) {
            return "FizzBuzz";
        } else if (num % 3 == 0) {
            return "Fizz";
        } else if (num % 5 == 0) {
            return "Buzz";
        } else {
            return String.valueOf(num);
        }
    }

    public static void main(String[] args) {
        for (int i = 1; i <= 100; i++) {
            System.out.println(of(i));
        }
    }
}
